"""ctrl+win+alt+n 快速新建文件"""
comment_lines = 0
blank_lines = 0
code_lines = 0


file_name = input("请输入文件名：")
with open(file_name,encoding="utf-8") as f:
    lines = f.readlines()
    for line in lines:
        line = line.strip()
        if line.startswith("#"):
            comment_lines += 1
        elif line == "":
            blank_lines += 1
        else:
            code_lines += 1
print("注释行数：{} 空行数：{} 代码行数：{}".format(comment_lines,blank_lines,code_lines))